package org.gesplan.entity.sig;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author David
 */
@Entity
@Table(name = "carrerer_eixos")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CarrererEixos.findAll", query = "SELECT c FROM CarrererEixos c"),
    @NamedQuery(name = "CarrererEixos.findByGid", query = "SELECT c FROM CarrererEixos c WHERE c.gid = :gid"),
    @NamedQuery(name = "CarrererEixos.findByNombre", query = "SELECT c FROM CarrererEixos c WHERE c.nombre = :nombre"),
    @NamedQuery(name = "CarrererEixos.findByCcar", query = "SELECT c FROM CarrererEixos c WHERE c.ccar = :ccar")
})
public class CarrererEixos implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "gid")
    private Integer gid;
    @Column(name = "nombre")
    private String nombre;
    @Column(name = "ccar")
    private String ccar;


    public CarrererEixos() {
    }


    public CarrererEixos(Integer gid) {
        this.gid = gid;
    }


    public Integer getGid() {
        return gid;
    }

    
    public String getNombre() {
        return nombre;
    }


    public String getCcar() {
        return ccar;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (gid != null ? gid.hashCode() : 0);
        return hash;
    }


    @Override
    public boolean equals(Object object) {
        if (!(object instanceof CarrererEixos)) {
            return false;
        }
        CarrererEixos other = (CarrererEixos) object;
        return (this.gid != null || other.gid == null) && (this.gid == null || this.gid.equals(other.gid));
    }


    @Override
    public String toString() {
        return nombre;
    }
    
    
}